Markup |
<apex:page standardStylesheets="false" showHeader="true" sidebar="false" controller="omnistudio.DocumentTemplateDisplayController">
<apex:includeLightning />
<html xmlns:ng="http://angularjs.org" lang="en">
<head>
<meta charset="utf-8"/>
<base href="/apex/DocumentTemplate"/>
<apex:includeScript value="/soap/ajax/56.0/connection.js"/>
<apex:includeScript value="/xdomain/xdomain.js"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__vlocity_core_assets, '/latest/vlocity_core_assets.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__angular_strap_bundle_1_6)}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__vlocity_assets, '/bower_components/angular-drag-and-drop-lists/angular-drag-and-drop-lists.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__vlocity_assets, '/javascripts/segjs.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__dropzone, '/dist/min/dropzone.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__tinymce, '/js/tinymce/tinymce.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__ui_tinymce, '/src/tinymce.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__docgenutil, 'docgenFieldMappingUtils.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__docxtemplater_bundle, '/jszip/jszip.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__docxtemplater_bundle, '/vendor/jszip-utils.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__docxtemplater_bundle, '/vendor/file-saver.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__docxtemplater_bundle, '/build/docxtemplater.v3.5.0.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__docxtemplater_bundle, '/modules/docxtemplater-link-module.v0.2.3.min.js')}"/>
<apex:includeScript value="{!$Resource.omnistudio__ViaDirectives}"/>
<apex:includeScript value="{!$Resource.omnistudio__SldsAngular}"/>
<apex:includeScript value="{!$Resource.omnistudio__DocumentTemplateApp}"/>
<apex:includeScript value="{!$Resource.omnistudio__DocxGenerateSections}"/>
<apex:stylesheet value="{!URLFOR($Resource.omnistudio__slds, '/assets/styles/salesforce-lightning-design-system-vf.min.css')}"/>
<apex:includeScript value="/support/console/42.0/integration.js"/>
<apex:stylesheet value="{!URLFOR($Resource.omnistudio__vlocity_assets, '/css/font-hack.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.omnistudio__dropzone, '/dist/min/dropzone.min.css')}"/>
<apex:stylesheet value="{!$Resource.omnistudio__DocumentBaseCss}" />
<apex:stylesheet value="{!$Resource.omnistudio__DocumentTemplateCss}" />
<!-- PDFTRON Libraries for salesforce side implementation-->
<!-- <apex:includeScript value="{!URLFOR($Resource.cs_pdftron_lib, '/core/external/jquery-3.5.1.min.js')}"/> -->
<apex:includeScript value="{!URLFOR($Resource.omnistudio__cs_pdftron_lib, '/core/webviewer-core.min.js')}"/>
<apex:includeScript value="{!$Resource.omnistudio__cs_pdftron_documentgeneration}"/>
<apex:includeScript value="{!URLFOR($Resource.omnistudio__docxtemplater_bundle, '/domPurify/domPurify.min.js')}"/>
</head>
<body>
<div class="vloc-body ng-cloak" ng-app="documentTemplateApp" ng-controller="initDocumentTemplateCtrl">
<div class="slds-spinner_container" ng-show="vlcLoading">
<div class="slds-spinner slds-spinner_brand slds-spinner_large" aria-hidden="false" role="status">
<div class="slds-spinner__dot-a"></div>
<div class="slds-spinner__dot-b"></div>
</div>
</div>
<div ng-if="pageParams.templateType === CONST.WEB || pageParams.templateType === CONST.UNDEFINED">
<web-template-type page-params="pageParams"></web-template-type>
</div>
<div ng-if="pageParams.templateType === CONST.DOCX || pageParams.templateType === CONST.PPTX || pageParams.templateType === CONST.MICROSOFT365WORD">
<docx-template-type page-params="pageParams"></docx-template-type>
</div>
<div id="lightningFilePreview"></div>
</div>
<c:TokenMappingComponent />
<script type="text/javascript">
/**
* Foundation package global variables
**/
window.IsFoundation = {!JSENCODE(IF(isFoundation, "true", "false"))};
window.DocTemplateFieldMappings = JSON.parse('{!JSENCODE(docTemplateFieldMappings)}');
window.nameSpacePrefix = '{!nameSpacePrefix}';
window.bOmnistudio = {!bOmnistudio};
_.noConflict();
window.sessionId = '{!vlocAccessToken}';
window.orgId = '{!$Organization.Id}';
window.userLocale = '{!userLanguageLocale}';
var pdfGenerationSource = '{!JSENCODE(pdfGenerationSource)}';
Visualforce.remoting.timeout = 120000; // Set timeout at page level
var remoteActions = {
getAllCloneableTemplates: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getAllCloneableTemplates}',
config: {escape: false}
},
getSectionsForTemplate: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getSectionsForTemplate}',
config: {escape: false}
},
getTypeValues: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getTypeValues}',
config: {escape: false}
},
getApplicableTypeValues: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getApplicableTypeValues}',
config: {escape: false}
},
getApplicableItemTypeValues: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getApplicableItemTypeValues}',
config: {escape: false}
},
getSectionTypes: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getSectionTypes}',
config: {escape: false}
},
getClauses: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getClauses}',
config: {escape: false}
},
getTemplateData: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getTemplateData}',
config: {escape: false}
},
getGenericClauses: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getGenericClauses}',
config: {escape: false}
},
getTemplateTypeValues: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getTemplateTypeValues}',
config: {escape: false}
},
getTemplateLanguages: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getTemplateLanguages}',
config: {escape: false}
},
saveTemplate: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.saveDocTemplate}',
config: {escape: false}
},
getTemplateTokens: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getTemplateTokens}',
config: {escape: false}
},
saveTemplateSection: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.saveTemplateSection}',
config: {escape: false}
},
saveAllSections: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.saveAllSections}',
config: {escape: false}
},
deleteTemplateSection: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.deleteTemplateSection}',
config: {escape: false}
},
deleteTemplateSections: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.deleteTemplateSections}',
config: {escape: false}
},
cloneAllSections: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.cloneAllSections}',
config: {escape: false}
},
cloneDocumentTemplate: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.cloneDocumentTemplate}',
config: {escape: false}
},
deactivateTemplate: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.deactivateTemplate}',
config: {escape: false}
},
deleteTemplate: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.deleteTemplate}',
config: {escape: false}
},
createNewVersion: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.createNewVersionOfDocumentTemplate}',
config: {escape: false}
},
getAllFolders: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getAllFolders}',
config: {escape: false}
},
getAllImages: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getAllImages}',
config: {escape: false}
},
getDocuSignSignatureTabs: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getDocuSignSignatureTabs}',
config: {escape: false}
},
getTemplateProducts: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getTemplateProducts}',
config: {escape: false}
},
getProducts: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getProducts}',
config: {escape: false}
},
getEntityFilters: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getSObjectEntityFilters}',
config: {escape: false}
},
getTemplateConditions: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getTemplateConditions}',
config: {escape: false}
},
validateCustomClass: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.validateCustomClass}',
config: {escape: false}
},
createEntityFilter: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.createSObjectEntityFilter}',
config: {escape: false}
},
getTrackChangeSetting: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getTrackChangeSetting}',
config: {escape: false}
},
getDocumentTemplateWorkspace: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getDocumentTemplateWorkspace}',
config: {escape: false}
},
getContractTypeList: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getContractTypeList}',
config: {escape: false}
},
getDefaultContractType: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getDefaultContractType}',
config: {escape: false}
},
isEntityFilterEmpty: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.isEntityFilterEmpty}',
config: {escape: false}
},
getFieldLabels: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getFieldLabels}',
config: {escape: false}
},
getDRBundleId: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getDRBundleId}',
config: {escape: false}
},
getUsageValues: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getUsageValues}',
config: {escape: false}
},
saveDocxRelMetadata: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.saveDocxRelMetadata}',
config: {escape: false}
},
getGenericDocGenOSURL: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getGenericDocGenOSURL}',
config: {escape: false}
},
generateGUID: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.generateGUID}',
config: {escape: false}
},
searchDocumentTemplates: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.searchDocumentTemplates}',
config: {escape: false}
},
getDocumentTemplatesById: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getDocumentTemplatesById}',
config: {escape: false}
},
setTemplateContentVersionDocx: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.setTemplateContentVersionDocx}',
config: {escape: false}
},
getClauseContentForDocx: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getClauseContentForDocx}',
config: {escape: false}
},
getDocxTemplateSectionHtmlContent: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getDocxTemplateSectionHtmlContent}',
config: {escape: false}
},
linkContentVersionToTemplateElement: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.linkContentVersionToTemplateElement}',
config: {escape: false}
},
getPDFIntegrationConfig: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getPDFIntegrationConfig}',
config: {escape: false}
},
getClientSidePdfLibraries: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getClientSidePdfLibraries}',
config: {escape: false}
},
getDocumentGenerationMethods: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getDocumentGenerationMethods}',
config: {escape: false}
},
getPdfGenerationMethods: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getPdfGenerationMethods}',
config: {escape: false}
},
deleteDocxFiles: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.deleteDocxFiles}',
config: {escape: false}
},
isOsFirstThenVertical: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.isOsFirstThenVertical}',
config: {escape: false}
},
createDocumentUrl: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.createDocumentUrl}',
config: {escape: false}
},
getDocumentUrl: {
action: '{!$RemoteAction.DocumentTemplateDisplayController.getDocumentUrl}',
config: {escape: false}
},
};
var modalLabels = {
'CLMPleaseReviewDRCustomClass' : '{!JSENCODE($Label.omnistudio__CLMPleaseReviewDRCustomClass)}',
'CLMClauseClose': '{!JSENCODE($Label.omnistudio__CLMClauseClose)}',
'CLMTemplateTemplateDetails': "{!JSENCODE($Label.omnistudio__CLMTemplateTemplateDetails)}",
'CLMTemplateTemplateName': '{!JSENCODE($Label.omnistudio__CLMTemplateTemplateName)}',
'CLMTemplateActive': '{!JSENCODE($Label.omnistudio__CLMTemplateActive)}',
'CLMTemplateVersion': '{!JSENCODE($Label.omnistudio__CLMTemplateVersion)}',
'CLMTemplateSelectAllApplicableObjHeaders': '{!JSENCODE($Label.omnistudio__CLMTemplateSelectAllApplicableObjHeaders)}',
'CLMTemplateSelectAllApplicableObjLines': '{!JSENCODE($Label.omnistudio__CLMTemplateSelectAllApplicableObjLines)}',
'CLMTemplateTrackContractRedlines': '{!JSENCODE($Label.omnistudio__CLMTemplateTrackContractRedlines)}',
'CLMTemplateTrackRedlines': '{!JSENCODE($Label.omnistudio__CLMTemplateTrackRedlines)}',
'CLMTemplateRestrictTemplateToContractTypes': '{!JSENCODE($Label.omnistudio__CLMTemplateRestrictTemplateToContractTypes)}',
'CLMTemplateSpecifyContractTypes': '{!JSENCODE($Label.omnistudio__CLMTemplateSpecifyContractTypes)}',
'CLMTemplateAllContractTypes': '{!JSENCODE($Label.omnistudio__CLMTemplateAllContractTypes)}',
'CLMTemplateSwitchToDefault': '{!JSENCODE($Label.omnistudio__CLMTemplateSwitchToDefault)}',
'CLMTemplateEditDocumentDefaultStyling': '{!JSENCODE($Label.omnistudio__CLMTemplateEditDocumentDefaultStyling)}',
'CLMTemplateDefaultFontFamilyDocument': '{!JSENCODE($Label.omnistudio__CLMTemplateDefaultFontFamilyDocument)}',
'CLMTemplateDefineStyleEachSectionHeading': '{!JSENCODE($Label.omnistudio__CLMTemplateDefineStyleEachSectionHeading)}',
'CLMTemplateSample': '{!JSENCODE($Label.omnistudio__CLMTemplateSample)}',
'CLMTemplateText': '{!JSENCODE($Label.omnistudio__CLMTemplateText)}',
'CLMTemplateSelectAllFontFormatsToApply': '{!JSENCODE($Label.omnistudio__CLMTemplateSelectAllFontFormatsToApply)}',
'CLMTemplateFontSize': '{!JSENCODE($Label.omnistudio__CLMTemplateFontSize)}',
'CLMTemplateFontColor': '{!JSENCODE($Label.omnistudio__CLMTemplateFontColor)}',
'CLMTemplateFontFamily': '{!JSENCODE($Label.omnistudio__CLMTemplateFontFamily)}',
'CLMTemplateSelectTextAlignment': '{!JSENCODE($Label.omnistudio__CLMTemplateSelectTextAlignment)}',
'CLMTemplateSelectIndentation': '{!JSENCODE($Label.omnistudio__CLMTemplateSelectIndentation)}',
'CLMTemplateCloneExistingTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateCloneExistingTemplate)}',
'CLMTemplateCancel': '{!JSENCODE($Label.omnistudio__CLMTemplateCancel)}',
'CLMTemplateClearClone': '{!JSENCODE($Label.omnistudio__CLMTemplateClearClone)}',
'CLMTemplateDeactivateTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateDeactivateTemplate)}',
'CLMTemplateCreateNewVersion': '{!JSENCODE($Label.omnistudio__CLMTemplateCreateNewVersion)}',
'CLMTemplateDeleteTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateDeleteTemplate)}',
'CLMTemplateTestTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateTestTemplate)}',
'CLMTemplateSignatureRequired': '{!JSENCODE($Label.omnistudio__CLMTemplateSignatureRequired)}',
'CLMTemplateSectionErrorsMsg': '{!JSENCODE($Label.omnistudio__CLMTemplateSectionErrorsMsg)}',
'CLMTemplateOkay': '{!JSENCODE($Label.omnistudio__CLMTemplateOkay)}',
'CLMTemplateUnsavedSectionsMsg': '{!JSENCODE($Label.omnistudio__CLMTemplateUnsavedSectionsMsg)}',
'CLMTemplateSaveTemplateVersionMsg': '{!JSENCODE($Label.omnistudio__CLMTemplateSaveTemplateVersionMsg)}',
'CLMTemplateSaveTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateSaveTemplate)}',
'CLMTemplatePickImg': '{!JSENCODE($Label.omnistudio__CLMTemplatePickImg)}',
'CLMTemplateSelectedImg': '{!JSENCODE($Label.omnistudio__CLMTemplateSelectedImg)}',
'CLMTemplateInsert': '{!JSENCODE($Label.omnistudio__CLMTemplateInsert)}',
'CLMTemplatePickSignerRole' :'{!JSENCODE($Label.omnistudio__CLMTemplatePickSignerRole)}',
'CLMTemplateAnchorString' :'{!JSENCODE($Label.omnistudio__CLMTemplateAnchorString)}',
'CLMTemplateSignerRoles' : '{!JSENCODE($Label.omnistudio__CLMTemplateSignerRoles)}',
'CLMTemplateSaveTemplateDetails': '{!JSENCODE($Label.omnistudio__CLMTemplateSaveTemplateDetails)}',
'CLMTemplateCloneTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateCloneTemplate)}',
'CLMTemplateDeleteSection': '{!JSENCODE($Label.omnistudio__CLMTemplateDeleteSection)}',
'CLMClauseAreYouSureDeleteSection': '{!JSENCODE($Label.omnistudio__CLMClauseAreYouSureDeleteSection)}',
'CLMClauseAreYouSureDeleteTemplate': '{!JSENCODE($Label.omnistudio__CLMClauseAreYouSureDeleteTemplate)}',
'CLMTemplateType': '{!JSENCODE($Label.omnistudio__CLMTemplateType)}',
'CLMTemplateTokenMapping': '{!JSENCODE($Label.omnistudio__CLMTemplateTokenMapping)}',
'CLMTemplateTokenMappingMethod': '{!JSENCODE($Label.omnistudio__CLMTemplateTokenMappingMethod)}',
'CLMTemplateTokenMappingChangeWarning': '{!JSENCODE($Label.omnistudio__CLMTemplateTokenMappingChangeWarning)}',
'CLMTemplateAutoAddSectionKeyChangeWarning': '{!$Label.omnistudio__CLMTemplateAutoAddSectionKeyChangeWarning}',
'CLMTemplateExtractEmbeddedChangeWarning': '{!JSENCODE($Label.omnistudio__CLMTemplateExtractEmbeddedChangeWarning)}',
'CLMTemplateExtractEmbeddedWarningTitle': '{!JSENCODE($Label.omnistudio__CLMTemplateExtractEmbeddedWarningTitle)}',
'CLMTemplateAutoAddSectionWarningTitle': '{!JSENCODE($Label.omnistudio__CLMTemplateAutoAddSectionWarningTitle)}',
'CLMTemplateDefineDataMappingForToken':'{!JSENCODE($Label.omnistudio__CLMTemplateDefineDataMappingForToken)}',
'CLMTemplateForApplicableType':'{!JSENCODE($Label.omnistudio__CLMTemplateForApplicableType)}',
'CLMTemplateTokenMappingObjNoField':'{!JSENCODE($Label.omnistudio__CLMTemplateTokenMappingObjNoField)}',
'CLMTemplateApply':'{!JSENCODE($Label.omnistudio__CLMTemplateApply)}',
'CLMTemplateDefineMapping': '{!JSENCODE($Label.omnistudio__CLMTemplateDefineMapping)}',
'CLMTemplateEdit': '{!JSENCODE($Label.omnistudio__CLMTemplateEdit)}',
'CLMTemplateEmptyFolder': '{!JSENCODE($Label.omnistudio__CLMTemplateEmptyFolder)}',
'CLMTemplateLanguage': '{!JSENCODE($Label.omnistudio__CLMTemplateLanguage)}',
'CLMTemplateTokenJSONFormatTitle': '{!JSENCODE($Label.omnistudio__CLMTemplateTokenJSONFormatTitle)}',
'CLMCopyToClipboard': '{!JSENCODE($Label.omnistudio__CLMCopyToClipboard)}',
'CLMClausePrefix':'{!JSENCODE($Label.omnistudio__CLMClausePrefix)}',
'CLMTemplateMissingClausesLabel':'{!JSENCODE($Label.omnistudio__CLMTemplateMissingClausesLabel)}',
'CLMTemplateNoClauseFoundWarningMessage':'{!JSENCODE($Label.omnistudio__CLMTemplateNoClauseFoundWarningMessage)}',
'CLMTemplateFoundWarningMessage':'{!JSENCODE($Label.omnistudio__CLMTemplateFoundWarningMessage)}',
'CLMTemplateClauseTokenFoundMessage':'{!JSENCODE($Label.omnistudio__CLMTemplateClauseTokenFoundMessage)}',
'CLMTemplateClickNext':'{!JSENCODE($Label.omnistudio__CLMTemplateClickNext)}',
'CLMTemplateNext':'{!JSENCODE($Label.omnistudio__CLMTemplateNext)}',
'PdfFontValidationWarningMsg' : '{!JSENCODE($Label.omnistudio__PdfFontValidationWarningMsg)}',
'PdfFontWarningTitle' : '{!JSENCODE($Label.omnistudio__PdfFontWarningTitle)}',
'MS365DocTokenWarning' : '{!JSENCODE($Label.omnistudio__MS365DocTokenWarning)}',
'MS365DocError' : '{!JSENCODE($Label.omnistudio__MS365DocError)}'
};
var labels = {
'CLMTemplateSectionErrorsExist' : '{!JSENCODE($Label.omnistudio__CLMTemplateSectionErrorsExist)}',
'CLMTemplateSectionNotSaved' : '{!JSENCODE($Label.omnistudio__CLMTemplateSectionNotSaved)}',
'CLMTemplateNoSectionsTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateNoSectionsTemplate)}',
'CLMTemplateClickAddNewSection' : '{!JSENCODE($Label.omnistudio__CLMTemplateClickAddNewSection)}',
'CLMTemplateCreateNewTemplateSetting': '{!JSENCODE($Label.omnistudio__CLMTemplateClickAddNewSection)}',
'CLMTemplateSectionNumbering': '{!JSENCODE($Label.omnistudio__CLMTemplateSectionNumbering)}',
'CLMTemplateSaveTemplateDetails': '{!JSENCODE($Label.omnistudio__CLMTemplateSaveTemplateDetails)}',
'CLMTemplateStartNewTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateStartNewTemplate)}',
'CLMTemplateEditTemplateDetails': '{!JSENCODE($Label.omnistudio__CLMTemplateEditTemplateDetails)}',
'CLMTemplateSaveAllSections': '{!JSENCODE($Label.omnistudio__CLMTemplateSaveAllSections)}',
'CLMTemplateCopy': '{!JSENCODE($Label.omnistudio__CLMTemplateCopy)}',
'CLMTemplateEmbeddedTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateEmbeddedTemplate)}',
'CLMTemplateViewing': '{!JSENCODE($Label.omnistudio__CLMTemplateViewing)}',
'CLMTemplateEditing': '{!JSENCODE($Label.omnistudio__CLMTemplateEditing)}',
'CLMTemplateOfTemplate':'{!JSENCODE($Label.omnistudio__CLMTemplateOfTemplate)}',
'CLMTemplateNowEditingVersion':'{!JSENCODE($Label.omnistudio__CLMTemplateNowEditingVersion)}',
'CLMTemplateTemplateIs':'{!JSENCODE($Label.omnistudio__CLMTemplateTemplateIs)}',
'CLMTemplateInactive':'{!JSENCODE($Label.omnistudio__CLMTemplateInactive)}',
'CLMTemplateCloneTemplate':'{!JSENCODE($Label.omnistudio__CLMTemplateCloneTemplate)}',
'CLMTemplateSelectExistingTempalte':'{!JSENCODE($Label.omnistudio__CLMTemplateSelectExistingTempalte)}',
'CLMTemplateDataFrom':'{!JSENCODE($Label.omnistudio__CLMTemplateDataFrom)}',
'CLMTemplateStartNewTemplate':'{!JSENCODE($Label.omnistudio__CLMTemplateStartNewTemplate)}',
'CLMTemplateChooseSectionType':'{!JSENCODE($Label.omnistudio__CLMTemplateChooseSectionType)}',
'CLMTemplateSaveSection':'{!JSENCODE($Label.omnistudio__CLMTemplateSaveSection)}',
'CLMTemplateDeleteSection':'{!JSENCODE($Label.omnistudio__CLMTemplateDeleteSection)}',
'CLMTemplateEditingSection':'{!JSENCODE($Label.omnistudio__CLMTemplateEditingSection)}',
'CLMTemplateActiveReadOnly':'{!JSENCODE($Label.omnistudio__CLMTemplateActiveReadOnly)}',
'CLMTemplateSaveTemplateDetails': '{!JSENCODE($Label.omnistudio__CLMTemplateSaveTemplateDetails)}',
'CLMTemplateSuccessfully':'{!JSENCODE($Label.omnistudio__CLMTemplateSuccessfully)}',
'CLMTemplateAllSectionsSaved':'{!JSENCODE($Label.omnistudio__CLMTemplateAllSectionsSaved)}',
'CLMTemplateSavedTemplateSection':'{!JSENCODE($Label.omnistudio__CLMTemplateSavedTemplateSection)}',
'CLMTemplateCustomClassNoImplementation':'{!JSENCODE($Label.omnistudio__CLMTemplateCustomClassNoImplementation)}',
'CLMTemplateCustomClassNoExtension':'{!JSENCODE($Label.omnistudio__CLMTemplateCustomClassNoExtension)}',
'CLMTemplateCustomClassNotExist':'{!JSENCODE($Label.omnistudio__CLMTemplateCustomClassNotExist)}',
'CLMTemplateAllSectionsForTemplate':'{!JSENCODE($Label.omnistudio__CLMTemplateAllSectionsForTemplate)}',
'CLMTemplateHaveSavedSuccessfully':'{!JSENCODE($Label.omnistudio__CLMTemplateHaveSavedSuccessfully)}',
'CLMTemplateClonedSuccessfully':'{!JSENCODE($Label.omnistudio__CLMTemplateClonedSuccessfully)}',
'CLMTemplateCustomClassCustomSectionNoImplementation':'{!JSENCODE($Label.omnistudio__CLMTemplateCustomClassCustomSectionNoImplementation)}',
'CLMTemplateValidationErrorsOneOrMoreSections':'{!JSENCODE($Label.omnistudio__CLMTemplateValidationErrorsOneOrMoreSections)}',
'CLMTemplateClonedNewTemplate':'{!JSENCODE($Label.omnistudio__CLMTemplateClonedNewTemplate)}',
'CLMTemplateTheTemplate':'{!JSENCODE($Label.omnistudio__CLMTemplateTheTemplate)}',
'CLMTemplateInactiveAndEditable':'{!JSENCODE($Label.omnistudio__CLMTemplateInactiveAndEditable)}',
'CLMTemplateHasBeenDeleted':'{!JSENCODE($Label.omnistudio__CLMTemplateHasBeenDeleted)}',
'CLMTemplateSeeMoreContracts':'{!JSENCODE($Label.omnistudio__CLMTemplateSeeMoreContracts)}',
'CLMTemplateCannotBeDeletedUsed':'{!JSENCODE($Label.omnistudio__CLMTemplateCannotBeDeletedUsed)}',
'CLMTemplateCannotBeDeactivatedUsed':'{!JSENCODE($Label.omnistudio__CLMTemplateCannotBeDeactivatedUsed)}',
'CLMTemplateEnterSectionName':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterSectionName)}',
'CLMTemplateContentIs':'{!JSENCODE($Label.omnistudio__CLMTemplateContentIs)}',
'CLMTemplateCharactersExceedsLimit':'{!JSENCODE($Label.omnistudio__CLMTemplateCharactersExceedsLimit)}',
'CLMTemplateEnterSectionLineItem':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterSectionLineItem)}',
'CLMTemplateEnterCustomClassName':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterCustomClassName)}',
'CLMTemplateEnterTokenMapping':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterTokenMapping)}',
'CLMTemplateEnterColumnHeader':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterColumnHeader)}',
'CLMTemplateEnterColumnToken':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterColumnToken)}',
'CLMTemplateEnterColumnHeaderAndToken':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterColumnHeaderAndToken)}',
'CLMTemplateEnterColumnTokenFormat':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterColumnTokenFormat)}',
'CLMTemplateTemplateNameExists':'{!JSENCODE($Label.omnistudio__CLMTemplateTemplateNameExists)}',
'CLMTemplateNameCharacterLimit':'{!JSENCODE($Label.omnistudio__CLMTemplateNameCharacterLimit)}',
'CLMTemplatePlsShorten':'{!JSENCODE($Label.omnistudio__CLMTemplatePlsShorten)}',
'CLMTemplateEnterTemplateName':'{!JSENCODE($Label.omnistudio__CLMTemplateEnterTemplateName)}',
'CLMTemplateSelectAtleastOne':'{!JSENCODE($Label.omnistudio__CLMTemplateSelectAtleastOne)}',
'CLMTemplateSelectAFile':'{!JSENCODE($Label.omnistudio__CLMTemplateSelectAFile)}',
'CLMTemplateEnterSectionContent': '{!JSENCODE($Label.omnistudio__CLMTemplateEnterSectionContent)}',
'CLMTemplateActive': '{!JSENCODE($Label.omnistudio__CLMTemplateActive)}',
'CLMTemplateColumnHeader':'{!JSENCODE($Label.omnistudio__CLMTemplateColumnHeader)}',
'CLMTemplateColumnTokens':'{!JSENCODE($Label.omnistudio__CLMTemplateColumnTokens)}',
'CLMTemplateTotalTokens':'{!JSENCODE($Label.omnistudio__CLMTemplateTotalTokens)}',
'CLMTemplateSectionHeading': '{!JSENCODE($Label.omnistudio__CLMTemplateSectionHeading)}',
'CLMTemplateConditionalJson': '{!JSENCODE($Label.omnistudio__CLMTemplateConditionalJson)}',
'CLMTemplateConditionalJsonSectionTabLabel': '{!JSENCODE($Label.omnistudio__CLMTemplateConditionalJsonSectionTabLabel)}',
'CLMTemplateConditionalJsonRepeatableTabLabel': '{!JSENCODE($Label.omnistudio__CLMTemplateConditionalJsonRepeatableTabLabel)}',
'CLMTemplateConditionalJsonPlaceholder': '{!JSENCODE($Label.omnistudio__CLMTemplateConditionalJsonPlaceholder)}',
'CLMTemplateConditionalJsonRepeatable': '{!JSENCODE($Label.omnistudio__CLMTemplateConditionalJsonRepeatable)}',
'CLMTemplateDRBundleName': '{!JSENCODE($Label.omnistudio__CLMTemplateDRBundleName)}',
'CLMTemplateDRBundleNamePlaceholder': '{!JSENCODE($Label.omnistudio__CLMTemplateDRBundleNamePlaceholder)}',
'CLMTemplateDRBundleIconText': '{!JSENCODE($Label.omnistudio__CLMTemplateDRBundleIconText)}',
'CLMTemplateDEDRBundleIconText': '{!JSENCODE($Label.omnistudio__CLMTemplateDEDRBundleIconText)}',
'CLMTemplateWordDocTemplateName': '{!JSENCODE($Label.omnistudio__CLMTemplateWordDocTemplateName)}',
'CLMTemplateWordDocTemplateNamePlaceholder': '{!JSENCODE($Label.omnistudio__CLMTemplateWordDocTemplateNamePlaceholder)}',
'CLMTemplateDataExtractDataBundleName': '{!JSENCODE($Label.omnistudio__CLMTemplateDataExtractDataBundleName)}',
'CLMTemplateDataExtractDataBundleNamePlaceholder': '{!JSENCODE($Label.omnistudio__CLMTemplateDataExtractDataBundleNamePlaceholder)}',
'CLMTemplateUsageType': '{!JSENCODE($Label.omnistudio__CLMTemplateUsageType)}',
'CLMTemplateDisplayUnmappedTokens': '{!JSENCODE($Label.omnistudio__CLMTemplateDisplayUnmappedTokens)}',
'CLMTemplateBackToList': '{!JSENCODE($Label.omnistudio__CLMTemplateBackToList)}',
'CLMTemplateTemplateSettings': '{!JSENCODE($Label.omnistudio__CLMTemplateTemplateSettings)}',
'CLMTemplateBackToSection': '{!JSENCODE($Label.omnistudio__CLMTemplateBackToSection)}',
'CLMTemplateActivate': '{!JSENCODE($Label.omnistudio__CLMTemplateActivate)}',
'CLMTemplateNoConditionalClauseFound': '{!JSENCODE($Label.omnistudio__CLMTemplateNoConditionalClauseFound)}',
'CLMTemplateSectionApplicableLineItemTypes': '{!JSENCODE($Label.omnistudio__CLMTemplateSectionApplicableLineItemTypes)}',
'CLMTemplateDisplayTotal': '{!JSENCODE($Label.omnistudio__CLMTemplateDisplayTotal)}',
'CLMTemplateToken': '{!JSENCODE($Label.omnistudio__CLMTemplateToken)}',
'CLMTemplateErrorEmptyFilters': '{!JSENCODE($Label.omnistudio__CLMTemplateErrorEmptyFilters)}',
'CLMTemplateEditAdvEntityFilters': '{!JSENCODE($Label.omnistudio__CLMTemplateEditAdvEntityFilters)}',
'CLMTemplateDocumentSections': '{!JSENCODE($Label.omnistudio__CLMTemplateDocumentSections)}',
'CLMTemplateChooseClause': '{!JSENCODE($Label.omnistudio__CLMTemplateChooseClause)}',
'CLMTemplateNoGenericClause': '{!JSENCODE($Label.omnistudio__CLMTemplateNoGenericClause)}',
'CLMTemplateSearchClauses': '{!JSENCODE($Label.omnistudio__CLMTemplateSearchClauses)}',
'CLMTemplateEmbedTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateEmbedTemplate)}',
'CLMTemplateSearchTempaltes': '{!JSENCODE($Label.omnistudio__CLMTemplateSearchTempaltes)}',
'CLMTemplateEnterTheSectionName': '{!JSENCODE($Label.omnistudio__CLMTemplateEnterTheSectionName)}',
'CLMTemplateSectionType': '{!JSENCODE($Label.omnistudio__CLMTemplateSectionType)}',
'CLMTemplateSectionApplicableItemTypes': '{!JSENCODE($Label.omnistudio__CLMTemplateSectionApplicableItemTypes)}',
'CLMTemplateSectionProperties': '{!JSENCODE($Label.omnistudio__CLMTemplateSectionProperties)}',
'CLMTemplateAutoNumber': '{!JSENCODE($Label.omnistudio__CLMTemplateAutoNumber)}',
'CLMTemplateResetAutoNumber': '{!JSENCODE($Label.omnistudio__CLMTemplateResetAutoNumber)}',
'CLMTemplateAutoAddSectionKey': '{!JSENCODE($Label.omnistudio__CLMTemplateAutoAddSectionKey)}',
'CLMTemplateSectionKey': '{!JSENCODE($Label.omnistudio__CLMTemplateSectionKey)}',
'CLMTemplateExtractEmbeddedTemplate': '{!JSENCODE($Label.omnistudio__CLMTemplateExtractEmbeddedTemplate)}',
'CLMTemplateConstructTable': '{!JSENCODE($Label.omnistudio__CLMTemplateConstructTable)}',
'CLMTemplateRedHexColorCode': '{!JSENCODE($Label.omnistudio__CLMTemplateRedHexColorCode)}',
'CLMTemplateFillColor': '{!JSENCODE($Label.omnistudio__CLMTemplateFillColor)}',
'CLMTemplateBorder': '{!JSENCODE($Label.omnistudio__CLMTemplateBorder)}',
'CLMTemplateAllColumnsHeaderToken': '{!JSENCODE($Label.omnistudio__CLMTemplateAllColumnsHeaderToken)}',
'CLMTemplateEnterTotalToken': '{!JSENCODE($Label.omnistudio__CLMTemplateEnterTotalToken)}',
'CLMTemplateAddColumn': '{!JSENCODE($Label.omnistudio__CLMTemplateAddColumn)}',
'CLMTemplateConditionalProducts': '{!JSENCODE($Label.omnistudio__CLMTemplateConditionalProducts)}',
'CLMTemplateApexClassImplementVlocityOpenInterface': '{!JSENCODE($Label.omnistudio__CLMTemplateApexClassImplementVlocityOpenInterface)}',
'CLMTemplateAdvEntityFilters': '{!JSENCODE($Label.omnistudio__CLMTemplateAdvEntityFilters)}',
'CLMTemplateSearchAvailProducts': '{!JSENCODE($Label.omnistudio__CLMTemplateSearchAvailProducts)}',
'CLMTemplateSearchAvailProd': '{!JSENCODE($Label.omnistudio__CLMTemplateSearchAvailProd)}',
'CLMTemplateEntityConditionalFilters': '{!JSENCODE($Label.omnistudio__CLMTemplateEntityConditionalFilters)}',
'CLMTemplateBasicProductFilters': '{!JSENCODE($Label.omnistudio__CLMTemplateBasicProductFilters)}',
'CLMTemplateEnterSelectCreateEntityFilterName': '{!JSENCODE($Label.omnistudio__CLMTemplateEnterSelectCreateEntityFilterName)}',
'CLMTemplateEntityFilterName': '{!JSENCODE($Label.omnistudio__CLMTemplateEntityFilterName)}',
'CLMTemplateEntityFilterFormula': '{!JSENCODE($Label.omnistudio__CLMTemplateEntityFilterFormula)}',
'CLMTemplateCreateFilter': '{!JSENCODE($Label.omnistudio__CLMTemplateCreateFilter)}',
'CLMTemplateSelectExistingEntityFilter': '{!JSENCODE($Label.omnistudio__CLMTemplateSelectExistingEntityFilter)}',
'CLMTemplateRemoveEntityFilter': '{!JSENCODE($Label.omnistudio__CLMTemplateRemoveEntityFilter)}',
'CLMTemplateAdvSearch': '{!JSENCODE($Label.omnistudio__CLMTemplateAdvSearch)}',
'CLMTemplateClearSearch': '{!JSENCODE($Label.omnistudio__CLMTemplateClearSearch)}',
'CLMTemplateSearchTemplateName': '{!JSENCODE($Label.omnistudio__CLMTemplateSearchTemplateName)}',
'CLMTemplateSearchSectionName': '{!JSENCODE($Label.omnistudio__CLMTemplateSearchSectionName)}',
'CLMTemplateSearchSectionContent': '{!JSENCODE($Label.omnistudio__CLMTemplateSearchSectionContent)}',
'CLMTemplateViewSettings': '{!JSENCODE($Label.omnistudio__CLMTemplateViewSettings)}',
'CLMTemplateAddNewSection': '{!JSENCODE($Label.omnistudio__CLMTemplateAddNewSection)}',
'CLMTemplateApexClassExtendDocTemplateMappingAbstractClass': '{!JSENCODE($Label.omnistudio__CLMTemplateApexClassExtendDocTemplateMappingAbstractClass)}',
'CLMContractDocDragDropFiles': '{!JSENCODE($Label.omnistudio__CLMContractDocDragDropFiles)}',
'CLMContractDocBrowse': '{!JSENCODE($Label.omnistudio__CLMContractDocBrowse)}',
'CLMTemplateDocMaxFileSize': '{!JSENCODE($Label.omnistudio__CLMTemplateDocMaxFileSize)}',
'CLMTemplateAttachFile': '{!JSENCODE($Label.omnistudio__CLMTemplateAttachFile)}',
'CLMTemplateDownloadFile': '{!JSENCODE($Label.omnistudio__CLMTemplateDownloadFile)}',
'CLMTemplateReplaceFile': '{!JSENCODE($Label.omnistudio__CLMTemplateReplaceFile)}',
'CLMTemplateViewFile': '{!JSENCODE($Label.omnistudio__CLMTemplateViewFile)}',
'CLMTemplateUseExistingFile': '{!JSENCODE($Label.omnistudio__CLMTemplateUseExistingFile)}',
'CLMDocGenDownloadWord': '{!JSENCODE($Label.omnistudio__CLMDocGenDownloadWord)}',
'CLMDocGenDownloadPowerPoint': '{!JSENCODE($Label.omnistudio__CLMDocGenDownloadPowerPoint)}',
'CLMDocGenDownloadPDF': '{!JSENCODE($Label.omnistudio__CLMDocGenDownloadPDF)}',
'CLMTemplateViewTokenList': '{!JSENCODE($Label.omnistudio__CLMTemplateViewTokenList)}',
'CLMTemplateClauseReplacedMessage': '{!JSENCODE($Label.omnistudio__CLMTemplateClauseReplacedMessage)}',
'CLMTemplateDownloadFinalVersion': '{!JSENCODE($Label.omnistudio__CLMTemplateDownloadFinalVersion)}',
'CLMTemplateUseFinalVersion': '{!JSENCODE($Label.omnistudio__CLMTemplateUseFinalVersion)}',
'CLMTemplateDownloadOriginalFile': '{!JSENCODE($Label.omnistudio__CLMTemplateDownloadOriginalFile)}',
'CLMTemplateFileUploaded': '{!JSENCODE($Label.omnistudio__CLMTemplateFileUploaded)}',
'VlocityPDFTronNoSystemUserMsg':'{!JSENCODE($Label.omnistudio__VlocityPDFTronNoSystemUserMsg)}',
'VCloudTemplateDocumentGenerationMechanism': '{!JSENCODE($Label.omnistudio__VCloudTemplateDocumentGenerationMechanism)}',
'VCloudTemplatePdfGenerationMechanism': '{!JSENCODE($Label.omnistudio__VCloudTemplatePdfGenerationMechanism)}',
'CLMContinueCreatingNewDocumentTemplateVersion' : '{!JSENCODE($Label.omnistudio__CLMContinueCreatingNewDocumentTemplateVersion)}',
'OpenInMicrosoft' : '{!JSENCODE($Label.omnistudio__OpenInMicrosoft)}',
'OpenInMicrosoftProcessInfo' : '{!JSENCODE($Label.omnistudio__OpenInMicrosoftProcessInfo)}',
'OpenInMicrosoftNavigationInfo' : '{!JSENCODE($Label.omnistudio__OpenInMicrosoftNavigationInfo)}',
'PreviewNotAvailable' : '{!JSENCODE($Label.omnistudio__PreviewNotAvailable)}',
'MsDocEditMessage' : '{!JSENCODE($Label.omnistudio__MsDocEditMessage)}',
'NoFileFound' : '{!JSENCODE($Label.omnistudio__NoFileFound)}',
'DocumentCreatedSuccessfully' : '{!JSENCODE($Label.omnistudio__DocumentCreatedSuccessfully)}',
'UserlinkingfailedMessage' : '{!JSENCODE($Label.omnistudio__UserlinkingfailedMessage)}',
'ClickHere' : '{!JSENCODE($Label.omnistudio__ClickHere)}',
'OpenInMicrosoftNavigationFailedErrorMessage' : '{!JSENCODE($Label.omnistudio__OpenInMicrosoftNavigationFailedErrorMessage)}',
'SelectDocument': '{!JSENCODE($Label.omnistudio__SelectDocument)}',
};
angular.module('documentTemplateApp')
.value('IsFoundation', {!JSENCODE(IF(isFoundation, "true", "false"))})
.value('nameSpacePrefix', window.nameSpacePrefix)
.value('DocTemplateFieldMappings', window.DocTemplateFieldMappings)
.value('bOmnistudio', window.bOmnistudio)
.controller('initDocumentTemplateCtrl', function($scope, CONST, IsFoundation, nameSpacePrefix) {
'use strict';
$scope.pageParams = {
'templateType': '{!JSENCODE(LOWER($CurrentPage.parameters.templateType))}' || CONST.UNDEFINED,
'templateId': '{!JSENCODE($CurrentPage.parameters.templateId)}' || CONST.UNDEFINED,
'templateData': null,
'templateMetadata': null
};
if(IsFoundation) {
if($scope.pageParams.templateType === undefined || $scope.pageParams.templateId === undefined){ //If this is a new page
$scope.pageParams.templateType = CONST.DOCX;
}
}
$scope.CONST = CONST;
});
function launchFilePreview(contentVersionId) {
$Lightning.use('c:FilePreviewApp', function() {
$Lightning.createComponent(
'c:FilePreviewComponent',
{'contentVersionId': contentVersionId},
'lightningFilePreview',
function(cmp) {}
);
});
}
</script>
</body>
</html>
</apex:page> |